// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:53:57

// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   jb.java

package com.zelix;

import java.io.*;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class jb extends DataInputStream
{

    private ByteArrayInputStream a;
    private byte b[];
    private static String z;

    private jb(ByteArrayInputStream bytearrayinputstream, byte abyte0[], boolean flag)
    {
        super(bytearrayinputstream);
        a = bytearrayinputstream;
        if(flag)
            try
            {
                MessageDigest messagedigest = MessageDigest.getInstance(z);
                b = messagedigest.digest(abyte0);
            }
            catch(NoSuchAlgorithmException nosuchalgorithmexception)
            {
                b = new byte[0];
            }
    }

    public static jb a(InputStream inputstream, int i)
        throws IOException
    {
        return a(inputstream, i, true);
    }

    private static jb a(InputStream inputstream, int i, boolean flag)
        throws IOException
    {
        try
        {
            byte abyte0[] = new byte[i];
            int k;
            for(int j = 0; j < i && (k = inputstream.read(abyte0, j, Math.min(8192, i - j))) != -1; j += k);
            ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(abyte0);
            jb jb1 = new jb(bytearrayinputstream, abyte0, flag);
            return jb1;
        }
        finally
        {
            inputstream.close();
        }
    }

    public static jb a(byte abyte0[], boolean flag)
        throws IOException
    {
        ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(abyte0);
        return new jb(bytearrayinputstream, abyte0, flag);
    }

    public byte[] a()
    {
        return b;
    }

    public void reset()
    {
        a.reset();
    }

    private static String z(char ac[]) {
        for (int i = 0; i < ac.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key =0x75;
                    break;
                case 1:
                    key =42;
                    break;
                case 2:
                    key =8;
                    break;
                case 3:
                    key =112;
                    break;
                default:
                    key =97;
                    break;
            }
            ac[i] ^= key;
        }
        return new String(ac).intern();
    }

    static 
    {
        z = z("&bI".toCharArray());

    }
}